package com.fw.mediasession.media.player;

import android.net.Uri;
import android.os.Bundle;
import android.support.v4.media.RatingCompat;
import android.support.v4.media.session.MediaSessionCompat;

import com.fw.mediasession.media.mediasession.sessionutils.MediaSessionToClient;


public interface MediaPlayerFunction {

    /**
     * 播放器初始化逻辑及释放资源逻辑
     */
    void initPlayer( );

     void  releasePlayer();
     void  setMediaSessionToClientManager(MediaSessionToClient manager);

    /**
     * MediaSessionCompat.Callback
     */
     void  onPlayFromMediaId(MediaSessionCompat mediaSession, String mediaId, Bundle extras);

     void  onSkipToQueueItem(long id);

     void  onPlay();

     void  onPause();

     void  onStop();

     void  onSkipToNext();

     void  onSkipToPrevious();
     void  onPrepare();


     void  onSeekTo(Long pos);
     void  setPlaySpeed(float speed);

     void  onSetRepeatMode(MediaSessionCompat mediaSession, int repeatMode);

     void  onSetRating(MediaSessionCompat mediaSession, RatingCompat rating );

     void  onSetRating(MediaSessionCompat mediaSession,RatingCompat rating, Bundle extras);

     void  onPrepareFromSearch(String query,Bundle extras);

     void  onPlayFromSearch(String query,Bundle extras);

     void  onPrepareFromUri(Uri uri, Bundle extras);

     void  onPlayFromUri(Uri uri, Bundle extras);

     void  onCustomAction(MediaSessionCompat mediaSession,String action,Bundle extras);

     void  onFastForward() ;
     void  onRewind() ;

}
